/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package domaci3.model;

/**
 *
 * @author Ilija
 */
public class Kvadrat extends Cvor{

    private double stranica;
    
    public Kvadrat(double stranica) {
        this.stranica = stranica;
    }


    
    @Override
    public String prikazi() {
        return "Kvadrat [a="+stranica+"; Obim="+izracunajObim()+"]";
    }

    @Override
    public double izracunajObim() {
        return 4*stranica;
    }

    
    
    public double getStranica() {
        return stranica;
    }

    public void setStranica(double stranica) {
        this.stranica = stranica;
    }
    
    
    
}
